package list;

import java.util.LinkedList;

public class Test2 {
    public static void main(String[] args) {
        LinkedList<String> queue = new LinkedList<>();
        queue.add("1号");// 创建队列
        queue.add("2号");
        queue.add("3号");
        queue.add("4号");
        System.out.println(queue);
        // 出列
        System.out.println(queue.removeFirst());
        System.out.println(queue.removeFirst());
        System.out.println(queue.removeFirst());

        LinkedList<String> stake = new LinkedList<>();
        stake.push("BPZ");// 创建一个栈  圧栈
        stake.push("80弹");
        stake.push("62弹");
        stake.push("61弹");

        // 打出子弹  出栈
        System.out.println(stake.pop());
        System.out.println(stake.pop());
        System.out.println(stake.pop());
    }

}
